/*
*
* FILENAME:		udgtd.h
* CREATED AT:		2012/May/5
* DECRITION:		user defined global type defines, include enum, const and marco
* 
* MODULE:		any
* PLATFORM:		ubuntu-12.04/gcc-4.6.3
* AUTHOR:		incarnation-lee
* 
* ----------------------REVISION HISTROY------------------------
* No.	Date	Revised by	Function	Descrition
* 1	12/5/7	incar-lee	NA		created
*
*/

#ifndef UDGTD_H
#define UDGTD_H

#define OCT 8			/* define the hex numbers */
#define OCTBits 3		/* OCT in bits */
#define UP	3
#define DOWN	1
#define RIGHT	2
#define LEFT	0

typedef signed int STATUS;
typedef signed short ErrCode;

typedef struct mazepath{
	unsigned short x;
	unsigned short y;
	unsigned char color;	/* when 0 avaiable, and 1 NA, up-3,right-2,down-1,left-0 */
}S_mazepath;

typedef struct element{
	int value;
	short number;
	char name;
	S_mazepath sp;
}S_element,*Sp_element;

typedef struct sqstack{
	S_element *base;	/* the base of stack in sequence implement */
	S_element *top;		/* the top of a exited stack*/
	int rest;		/* the rest size of a exited stack */
}S_sqstack;

typedef struct sqlinear{
	Sp_element elem;	/* storge address of data element */
	int length;		/* the length of linear seq list */
	int rest;		/* the current rest size for storge */	
}S_sqlinear,*Sp_sqlinear;

typedef struct slk_lr{
	Sp_element elem;	/* storge address of data element */
	struct slk_lr *next;	/* pointer to the next element */
}S_slk_lr,*Sp_slk_lr;

#endif
